package com.wanjia.estate.constant.bank;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum CodeReason {
    REASON_10030000("10030000", "请求业务处理中",
            "稍后发起查询，或等待异步回调，确认交易状态"),
    REASON_20000000("20000000", "内部服务不可用、系统维护等（失败）",
            "与银联联系，确认系统稳定性"),
    REASON_40000000("40000000", "参数不合法（失败）",
            "检查报文是否符合接口定义，可能是上送了未定义的参数，或者必填参数未上送，或者参数值不合法等"),
    REASON_40030000("40030000", "安全限制等（失败）",
            "验签失败、证书找不到、流量超限、安全拒绝等原因引起的，排查原因，稍后再试。"),
    REASON_40040000("40040000", "请求业务失败",
            "根据具体错误原因处理"),
    REASON_40050000("40050000", "请求业务状态未知（请求交易重复）",
            "稍后发起查询，确认交易状态"),
    REASON_40060000("40060000", "请求业务状态未知（查询的原交易不存在）",
            "原交易字段重试，不改变交易主键。"),
    REASON_40070000("40070000", "请求业务状态未知（超时或者其他未知状态）",
            "稍后发起查询，确认交易状态。");

    private final String code;
    private final String description;
    private final String suggestion;

    public String code() {
        return code;
    }

    public String description() {
        return description;
    }

    public String duggestion() {
        return suggestion;
    }
}
